﻿using System.Collections.Generic;

namespace TestUp.Models.TestWorkers.TestsModel
{
    public class CheckTest: TestQuestion
    {
        public string QuestionText { get; set; }
        public List<Pair<string, bool>> Statements { get; set; }
        public string Answer { get; set; }

        public CheckTest()
        {
            TestType = TestTypes.CheckTest;
            Statements = new List<Pair<string, bool>>();
        }

        public bool Check(List<Pair<string, bool>> externalAnswer)
        {
            for (int i = 0; i < Statements.Count; i++)
            {
                if (Statements[i].Item2 != externalAnswer[i].Item2)
                    return false;
            }
            return true;
        }
    }
}